let typeMap = {'电力': 1, '蒸汽': 2, '水': 3, '压缩空气': 4, '天然气':5 ,'柴油':6,'汽油':7,'煤炭':8};
let typeRevetMap = ['电力', '蒸汽', '水', '压缩空气', '天然气','柴油','汽油','煤炭'];
let allData = [
  {
    "code": "1",
    "desc": "电力",
    "unit": "kWh",
    "children": [
      {
        "code": "I",
        "desc": "电流",
        "unit": "A",
        "children": [
          {
            "code": "Ia",
            "desc": "A相电流",
            "unit": "A",
            "children": null
          },
          {
            "code": "Ib",
            "desc": "B相电流",
            "unit": "A",
            "children": null
          },
          {
            "code": "Ic",
            "desc": "C相电流",
            "unit": "A",
            "children": null
          }
        ]
      },
      {
        "code": "U",
        "desc": "电压",
        "unit": "V",
        "children": [
          {
            "code": "Ua",
            "desc": "A相电压",
            "unit": "V",
            "children": null
          },
          {
            "code": "Ub",
            "desc": "B相电压",
            "unit": "V",
            "children": null
          },
          {
            "code": "Uc",
            "desc": "C相电压",
            "unit": "V",
            "children": null
          },
          {
            "code": "Uab",
            "desc": "AB线电压",
            "unit": "V",
            "children": null
          },
          {
            "code": "Uac",
            "desc": "AC线电压",
            "unit": "V",
            "children": null
          },
          {
            "code": "Ubc",
            "desc": "BC线电压",
            "unit": "V",
            "children": null
          }
        ]
      },
      {
        "code": "P",
        "desc": "有功功率",
        "unit": "kW",
        "children": [
          {
            "code": "Pa",
            "desc": "A相有功功率",
            "unit": "kW",
            "children": null
          },
          {
            "code": "Pb",
            "desc": "B相有功功率",
            "unit": "kW",
            "children": null
          },
          {
            "code": "Pc",
            "desc": "C相有功功率",
            "unit": "kW",
            "children": null
          },
          {
            "code": "P",
            "desc": "总有功功率",
            "unit": "kW",
            "children": null
          }
        ]
      },
      {
        "code": "Q",
        "desc": "无功功率",
        "unit": "kVar",
        "children": [
          {
            "code": "Qa",
            "desc": "A相无功功率",
            "unit": "kVar",
            "children": null
          },
          {
            "code": "Qb",
            "desc": "B相无功功率",
            "unit": "kVar",
            "children": null
          },
          {
            "code": "Qc",
            "desc": "C相无功功率",
            "unit": "kVar",
            "children": null
          },
          {
            "code": "Q",
            "desc": "总无功功率",
            "unit": "kVar",
            "children": null
          }
        ]
      },
      {
        "code": "S",
        "desc": "视在功率",
        "unit": "kVA",
        "children": [
          {
            "code": "Sa",
            "desc": "A相视在功率",
            "unit": "kVA",
            "children": null
          },
          {
            "code": "Sb",
            "desc": "B相视在功率",
            "unit": "kVA",
            "children": null
          },
          {
            "code": "Sc",
            "desc": "C相视在功率",
            "unit": "kVA",
            "children": null
          },
          {
            "code": "S",
            "desc": "总视在功率",
            "unit": "kVA",
            "children": null
          }
        ]
      },
      {
        "code": "Fr",
        "desc": "频率",
        "unit": "Hz",
        "children": [
          {
            "code": "Fr",
            "desc": "频率",
            "unit": "kVar",
            "children": null
          }
        ]
      },
      {
        "code": "Pf",
        "desc": "功率因数",
        "unit": "",
        "children": [
          {
            "code": "Pfa",
            "desc": "A相功率因数",
            "unit": "",
            "children": null
          },
          {
            "code": "Qb",
            "desc": "B相无功功率",
            "unit": "kVar",
            "children": null
          },
          {
            "code": "Qc",
            "desc": "C相无功功率",
            "unit": "kVar",
            "children": null
          },
          {
            "code": "Q",
            "desc": "总无功功率",
            "unit": "kVar",
            "children": null
          }
        ]
      },
      {
        "code": "E",
        "desc": "电量",
        "unit": "",
        "children": [
          {
            "code": "E",
            "desc": "总电量(正向有功)",
            "unit": "kVAh",
            "children": null
          },
          {
            "code": "E_active",
            "desc": "总有功电量",
            "unit": "kWh",
            "children": null
          },
          {
            "code": "E_reactive",
            "desc": "总无功电量",
            "unit": "kVarh",
            "children": null
          },
          {
            "code": "E_active_import",
            "desc": "正向有功电量",
            "unit": "kWh",
            "children": null
          },
          {
            "code": "E_active_export",
            "desc": "反向有功电量",
            "unit": "kWh",
            "children": null
          },
          {
            "code": "E_reactive_import",
            "desc": "正向无功电量",
            "unit": "kVarh",
            "children": null
          },
          {
            "code": "E_reactive_export",
            "desc": "反向无功电量",
            "unit": "kVarh",
            "children": null
          }
        ]
      },
      {
        "code": "unbal",
        "desc": "不平衡度",
        "unit": "%",
        "children": [
          {
            "code": "unbal_voltage",
            "desc": "电压不平衡度",
            "unit": "%",
            "children": null
          },
          {
            "code": "unbal_current",
            "desc": "电流不平衡度",
            "unit": "%",
            "children": null
          }
        ]
      },
      {
        "code": "RCD",
        "desc": "剩余电流",
        "unit": "mA",
        "children": [
          {
            "code": "RCD",
            "desc": "剩余电流",
            "unit": "mA",
            "children": null
          }
        ]
      },
      {
        "code": "THD",
        "desc": "总畸变率",
        "unit": "%",
        "children": [
          {
            "code": "THDIa",
            "desc": "A相电流总畸变率",
            "unit": "%",
            "children": null
          },
          {
            "code": "THDIb",
            "desc": "B相电流总畸变率",
            "unit": "%",
            "children": null
          },
          {
            "code": "THDIc",
            "desc": "C相电流总畸变率",
            "unit": "%",
            "children": null
          },
          {
            "code": "THDUa",
            "desc": "A相电压总畸变率",
            "unit": "%",
            "children": null
          },
          {
            "code": "THDUb",
            "desc": "B相电压总畸变率",
            "unit": "%",
            "children": null
          },
          {
            "code": "THDUc",
            "desc": "C相电压总畸变率",
            "unit": "%",
            "children": null
          }
        ]
      }
    ]
  },
  {
    "code": "2",
    "desc": "蒸汽",
    "unit": "Ton",
    "children": [
      {
        "code": "v",
        "desc": "流量",
        "unit": "Ton",
        "children": [
          {
            "code": "total_v",
            "desc": "总流量",
            "unit": "Ton",
            "children": null
          },
          {
            "code": "instant_v",
            "desc": "瞬时流量",
            "unit": "Ton",
            "children": null
          }
        ]
      },
      {
        "code": "pressure",
        "desc": "压力",
        "unit": "kPa/MPa",
        "children": [
          {
            "code": "pressure",
            "desc": "压力",
            "unit": "kPa/MPa",
            "children": null
          }
        ]
      },
      {
        "code": "temperature",
        "desc": "温度",
        "unit": "℃",
        "children": [
          {
            "code": "temperature",
            "desc": "温度",
            "unit": "℃",
            "children": null
          }
        ]
      },
      {
        "code": "density",
        "desc": "密度",
        "unit": "kg/m3",
        "children": [
          {
            "code": "density",
            "desc": "密度",
            "unit": "kg/m3",
            "children": null
          }
        ]
      },
      {
        "code": "heat_value",
        "desc": "发热值",
        "unit": "MJ/Ton",
        "children": [
          {
            "code": "total_heat_value",
            "desc": "总发热量",
            "unit": "MJ",
            "children": null
          },
          {
            "code": "instant_heat_value",
            "desc": "瞬时发热值",
            "unit": "MJ/Ton",
            "children": null
          }
        ]
      }
    ]
  },
  {
    "code": "3",
    "desc": "水",
    "unit": "m³",
    "children": [
      {
        "code": "v",
        "desc": "流量",
        "unit": "m3",
        "children": [
          {
            "code": "total_v",
            "desc": "总流量",
            "unit": "m3",
            "children": null
          },
          {
            "code": "instant_v",
            "desc": "瞬时流量",
            "unit": "m3/h",
            "children": null
          }
        ]
      },
      {
        "code": "pressure",
        "desc": "压力",
        "unit": "kPa/MPa",
        "children": [
          {
            "code": "pressure",
            "desc": "压力",
            "unit": "kPa/MPa",
            "children": null
          }
        ]
      },
      {
        "code": "temperature",
        "desc": "温度",
        "unit": "℃",
        "children": [
          {
            "code": "temperature",
            "desc": "温度",
            "unit": "℃",
            "children": null
          }
        ]
      },
      {
        "code": "density",
        "desc": "密度",
        "unit": "kg/m3",
        "children": [
          {
            "code": "density",
            "desc": "密度",
            "unit": "kg/m3",
            "children": null
          }
        ]
      },
      {
        "code": "heat_value",
        "desc": "发热值",
        "unit": "MJ/m3",
        "children": [
          {
            "code": "total_heat_value",
            "desc": "总发热量",
            "unit": "MJ",
            "children": null
          },
          {
            "code": "instant_heat_value",
            "desc": "瞬时发热值",
            "unit": "MJ/m3",
            "children": null
          }
        ]
      }
    ]
  },
  {
    "code": "4",
    "desc": "压缩空气",
    "unit": "m³",
    "children": [
      {
        "code": "v",
        "desc": "流量",
        "unit": "m3",
        "children": [
          {
            "code": "total_v",
            "desc": "总流量",
            "unit": "m3",
            "children": null
          },
          {
            "code": "instant_v",
            "desc": "瞬时流量",
            "unit": "m3/h",
            "children": null
          }
        ]
      },
      {
        "code": "pressure",
        "desc": "压力",
        "unit": "kPa/MPa",
        "children": [
          {
            "code": "pressure",
            "desc": "压力",
            "unit": "kPa/MPa",
            "children": null
          }
        ]
      },
      {
        "code": "temperature",
        "desc": "温度",
        "unit": "℃",
        "children": [
          {
            "code": "temperature",
            "desc": "温度",
            "unit": "℃",
            "children": null
          }
        ]
      },
      {
        "code": "density",
        "desc": "密度",
        "unit": "kg/m3",
        "children": [
          {
            "code": "density",
            "desc": "密度",
            "unit": "kg/m3",
            "children": null
          }
        ]
      },
      {
        "code": "heat_value",
        "desc": "发热值",
        "unit": "MJ/m3",
        "children": [
          {
            "code": "total_heat_value",
            "desc": "总发热量",
            "unit": "MJ",
            "children": null
          },
          {
            "code": "instant_heat_value",
            "desc": "瞬时发热值",
            "unit": "MJ/m3",
            "children": null
          }
        ]
      }
    ]
  },
  {
    "code": "5",
    "desc": "天然气",
    "unit": "m³",
    "children": [
      {
        "code": "v",
        "desc": "流量",
        "unit": "m3",
        "children": [
          {
            "code": "total_v",
            "desc": "总流量",
            "unit": "m3",
            "children": null
          },
          {
            "code": "instant_v",
            "desc": "瞬时流量",
            "unit": "m3/h",
            "children": null
          }
        ]
      },
      {
        "code": "pressure",
        "desc": "压力",
        "unit": "kPa/MPa",
        "children": [
          {
            "code": "pressure",
            "desc": "压力",
            "unit": "kPa/MPa",
            "children": null
          }
        ]
      },
      {
        "code": "temperature",
        "desc": "温度",
        "unit": "℃",
        "children": [
          {
            "code": "temperature",
            "desc": "温度",
            "unit": "℃",
            "children": null
          }
        ]
      },
      {
        "code": "density",
        "desc": "密度",
        "unit": "kg/m3",
        "children": [
          {
            "code": "density",
            "desc": "密度",
            "unit": "kg/m3",
            "children": null
          }
        ]
      },
      {
        "code": "heat_value",
        "desc": "发热值",
        "unit": "MJ/m3",
        "children": [
          {
            "code": "total_heat_value",
            "desc": "总发热量",
            "unit": "MJ",
            "children": null
          },
          {
            "code": "instant_heat_value",
            "desc": "瞬时发热值",
            "unit": "MJ/m3",
            "children": null
          }
        ]
      },
      {
        "code": "cr",
        "desc": "含碳量",
        "unit": "tc/t",
        "children": [
          {
            "code": "cr",
            "desc": "含碳量",
            "unit": "tc/t",
            "children": null
          }
        ]
      }
    ]
  },
  {
    "code": "6",
    "desc": "柴油",
    "unit": "Ton",
    "children": [
      {
        "code": "v",
        "desc": "流量",
        "unit": "m3",
        "children": [
          {
            "code": "total_v",
            "desc": "总流量",
            "unit": "Ton",
            "children": null
          },
          {
            "code": "instant_v",
            "desc": "瞬时流量",
            "unit": "Ton",
            "children": null
          }
        ]
      },
      {
        "code": "pressure",
        "desc": "压力",
        "unit": "kPa/MPa",
        "children": [
          {
            "code": "pressure",
            "desc": "压力",
            "unit": "kPa/MPa",
            "children": null
          }
        ]
      },
      {
        "code": "temperature",
        "desc": "温度",
        "unit": "℃",
        "children": [
          {
            "code": "temperature",
            "desc": "温度",
            "unit": "℃",
            "children": null
          }
        ]
      },
      {
        "code": "density",
        "desc": "密度",
        "unit": "kg/m3",
        "children": [
          {
            "code": "density",
            "desc": "密度",
            "unit": "kg/m3",
            "children": null
          }
        ]
      },
      {
        "code": "heat_value",
        "desc": "发热值",
        "unit": "MJ/m3",
        "children": [
          {
            "code": "total_heat_value",
            "desc": "总发热量",
            "unit": "MJ",
            "children": null
          },
          {
            "code": "instant_heat_value",
            "desc": "瞬时发热值",
            "unit": "MJ/Ton",
            "children": null
          }
        ]
      },
      {
        "code": "cr",
        "desc": "含碳量",
        "unit": "tc/t",
        "children": [
          {
            "code": "cr",
            "desc": "含碳量",
            "unit": "tc/t",
            "children": null
          }
        ]
      }
    ]
  },
  {
    "code": "7",
    "desc": "汽油",
    "unit": "Ton",
    "children": [
      {
        "code": "v",
        "desc": "流量",
        "unit": "Ton",
        "children": [
          {
            "code": "total_v",
            "desc": "总流量",
            "unit": "Ton",
            "children": null
          },
          {
            "code": "instant_v",
            "desc": "瞬时流量",
            "unit": "Ton",
            "children": null
          }
        ]
      },
      {
        "code": "pressure",
        "desc": "压力",
        "unit": "kPa/MPa",
        "children": [
          {
            "code": "pressure",
            "desc": "压力",
            "unit": "kPa/MPa",
            "children": null
          }
        ]
      },
      {
        "code": "temperature",
        "desc": "温度",
        "unit": "℃",
        "children": [
          {
            "code": "temperature",
            "desc": "温度",
            "unit": "℃",
            "children": null
          }
        ]
      },
      {
        "code": "density",
        "desc": "密度",
        "unit": "kg/m3",
        "children": [
          {
            "code": "density",
            "desc": "密度",
            "unit": "kg/m3",
            "children": null
          }
        ]
      },
      {
        "code": "heat_value",
        "desc": "发热值",
        "unit": "MJ/Ton",
        "children": [
          {
            "code": "total_heat_value",
            "desc": "总发热量",
            "unit": "MJ",
            "children": null
          },
          {
            "code": "instant_heat_value",
            "desc": "瞬时发热值",
            "unit": "MJ/Ton",
            "children": null
          }
        ]
      },
      {
        "code": "cr",
        "desc": "含碳量",
        "unit": "tc/t",
        "children": [
          {
            "code": "cr",
            "desc": "含碳量",
            "unit": "tc/t",
            "children": null
          }
        ]
      }
    ]
  },
  {
    "code": "8",
    "desc": "煤炭",
    "unit": "Ton",
    "children": [
      {
        "code": "v",
        "desc": "流量",
        "unit": "Ton",
        "children": [
          {
            "code": "total_v",
            "desc": "总流量",
            "unit": "Ton",
            "children": null
          },
          {
            "code": "instant_v",
            "desc": "瞬时流量",
            "unit": "Ton",
            "children": null
          }
        ]
      },
      {
        "code": "heat_value",
        "desc": "发热值",
        "unit": "MJ/m3",
        "children": [
          {
            "code": "total_heat_value",
            "desc": "总发热量",
            "unit": "MJ",
            "children": null
          },
          {
            "code": "instant_heat_value",
            "desc": "瞬时发热值",
            "unit": "MJ/Ton",
            "children": null
          }
        ]
      },
      {
        "code": "cr",
        "desc": "含碳量",
        "unit": "tc/t",
        "children": [
          {
            "code": "cr",
            "desc": "含碳量",
            "unit": "tc/t",
            "children": null
          }
        ]
      }
    ]
  }
]

let list = {
  "result": [
    {
      "id": 1,
      "sourceType": 1,
      "sourceFromType": -1,
      "sourceFromId": 0,
      "calFactor": 1,
      "projectId": 1,
      "name": "电力",
      "unit": "kWh",
      "calFactorUnit": "tce/kWh",
      "sourceFromName": "外购"
    },
    {
      "id": 2,
      "sourceType": 2,
      "sourceFromType": -1,
      "sourceFromId": 0,
      "calFactor": 1,
      "projectId": 1,
      "name": "蒸汽",
      "unit": "Ton",
      "calFactorUnit": "tce/Ton",
      "sourceFromName": "外购"
    },
    {
      "id": 3,
      "sourceType": 3,
      "sourceFromType": -1,
      "sourceFromId": 0,
      "calFactor": 1,
      "projectId": 1,
      "name": "水",
      "unit": "m³",
      "calFactorUnit": "tce/m³",
      "sourceFromName": "外购"
    },
    {
      "id": 10,
      "sourceType": 6,
      "sourceFromType": -1,
      "sourceFromId": 0,
      "calFactor": 1,
      "projectId": 1,
      "name": "柴油",
      "unit": "Ton",
      "calFactorUnit": "tce/Ton",
      "sourceFromName": "外购"
    }
  ]
}


export {
  typeMap, clearData, typeRevetMap
}
